<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Formatter::BaseTextFormatter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Formatter::BaseTextFormatter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="BaseFormatter.html">
                BaseFormatter
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Baseclass for text-based formatters. Can in fact be used for non-text based
ones too - just ignore the <tt>output</tt> constructor argument.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000158">backtrace_line</a>&nbsp;&nbsp;
      <a href="#M000165">blue</a>&nbsp;&nbsp;
      <a href="#M000156">close</a>&nbsp;&nbsp;
      <a href="#M000159">colour</a>&nbsp;&nbsp;
      <a href="#M000151">colour=</a>&nbsp;&nbsp;
      <a href="#M000153">colourise</a>&nbsp;&nbsp;
      <a href="#M000152">dump_failure</a>&nbsp;&nbsp;
      <a href="#M000155">dump_pending</a>&nbsp;&nbsp;
      <a href="#M000154">dump_summary</a>&nbsp;&nbsp;
      <a href="#M000150">example_pending</a>&nbsp;&nbsp;
      <a href="#M000157">format_backtrace</a>&nbsp;&nbsp;
      <a href="#M000161">green</a>&nbsp;&nbsp;
      <a href="#M000163">magenta</a>&nbsp;&nbsp;
      <a href="#M000149">new</a>&nbsp;&nbsp;
      <a href="#M000160">output_to_tty?</a>&nbsp;&nbsp;
      <a href="#M000162">red</a>&nbsp;&nbsp;
      <a href="#M000164">yellow</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">dry_run</td>
          <td class="context-item-value">&nbsp;[W]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000149" class="method-detail">
        <a name="M000149"></a>

        <div class="method-heading">
          <a href="#M000149" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(where)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a <a href="BaseTextFormatter.html#M000149">new</a> instance that
will write to <tt>where</tt>. If <tt>where</tt> is a <a
href="../../../String.html">String</a>, output will be written to the File
with that name, otherwise <tt>where</tt> is exected to be an IO (or an
object that responds to puts and write).
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000149-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 13</span>
13:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">where</span>)
14:           <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">where</span>)
15:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">where</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
16:             <span class="ruby-ivar">@output</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">where</span>, <span class="ruby-value str">'w'</span>)
17:           <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">where</span> <span class="ruby-operator">==</span> <span class="ruby-constant">STDOUT</span>
18:             <span class="ruby-ivar">@output</span> = <span class="ruby-constant">Kernel</span>
19:             <span class="ruby-keyword kw">def</span> <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
20:               <span class="ruby-constant">STDOUT</span>.<span class="ruby-identifier">flush</span>
21:             <span class="ruby-keyword kw">end</span>
22:           <span class="ruby-keyword kw">else</span>
23:             <span class="ruby-ivar">@output</span> = <span class="ruby-identifier">where</span>
24:           <span class="ruby-keyword kw">end</span>
25:           <span class="ruby-ivar">@colour</span> = <span class="ruby-keyword kw">false</span>
26:           <span class="ruby-ivar">@dry_run</span> = <span class="ruby-keyword kw">false</span>
27:           <span class="ruby-ivar">@snippet_extractor</span> = <span class="ruby-constant">SnippetExtractor</span>.<span class="ruby-identifier">new</span>
28:           <span class="ruby-ivar">@pending_examples</span> = []
29:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000156" class="method-detail">
        <a name="M000156"></a>

        <div class="method-heading">
          <a href="#M000156" class="method-signature">
          <span class="method-name">close</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000156-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 91</span>
91:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
92:           <span class="ruby-keyword kw">if</span> <span class="ruby-constant">IO</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@output</span>
93:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">close</span> 
94:           <span class="ruby-keyword kw">end</span>
95:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000151" class="method-detail">
        <a name="M000151"></a>

        <div class="method-heading">
          <a href="#M000151" class="method-signature">
          <span class="method-name">colour=</span><span class="method-args">(colour)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000151-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 35</span>
35:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour=</span>(<span class="ruby-identifier">colour</span>)
36:           <span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">colour</span>
37:           <span class="ruby-keyword kw">begin</span> ; <span class="ruby-identifier">require</span> <span class="ruby-value str">'Win32/Console/ANSI'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@colour</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/win32/</span> ; <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> ; <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You must gem install win32console to use colour on Windows&quot;</span> ; <span class="ruby-keyword kw">end</span>
38:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000153" class="method-detail">
        <a name="M000153"></a>

        <div class="method-heading">
          <a href="#M000153" class="method-signature">
          <span class="method-name">colourise</span><span class="method-args">(s, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000153-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 48</span>
48:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colourise</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">failure</span>)
49:           <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">expectation_not_met?</span>)
50:             <span class="ruby-identifier">red</span>(<span class="ruby-identifier">s</span>)
51:           <span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">pending_fixed?</span>)
52:             <span class="ruby-identifier">blue</span>(<span class="ruby-identifier">s</span>)
53:           <span class="ruby-keyword kw">else</span>
54:             <span class="ruby-identifier">magenta</span>(<span class="ruby-identifier">s</span>)
55:           <span class="ruby-keyword kw">end</span>
56:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000152" class="method-detail">
        <a name="M000152"></a>

        <div class="method-heading">
          <a href="#M000152" class="method-signature">
          <span class="method-name">dump_failure</span><span class="method-args">(counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000152-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 40</span>
40:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_failure</span>(<span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
41:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
42:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{counter.to_s})&quot;</span>
43:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">colourise</span>(<span class="ruby-node">&quot;#{failure.header}\n#{failure.exception.message}&quot;</span>, <span class="ruby-identifier">failure</span>)
44:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">format_backtrace</span>(<span class="ruby-identifier">failure</span>.<span class="ruby-identifier">exception</span>.<span class="ruby-identifier">backtrace</span>)
45:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
46:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000155" class="method-detail">
        <a name="M000155"></a>

        <div class="method-heading">
          <a href="#M000155" class="method-signature">
          <span class="method-name">dump_pending</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000155-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 80</span>
80:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_pending</span>
81:           <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@pending_examples</span>.<span class="ruby-identifier">empty?</span>
82:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
83:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Pending:&quot;</span>
84:             <span class="ruby-ivar">@pending_examples</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pending_example</span><span class="ruby-operator">|</span>
85:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{pending_example[0]} (#{pending_example[1]})&quot;</span> 
86:             <span class="ruby-keyword kw">end</span>
87:           <span class="ruby-keyword kw">end</span>
88:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
89:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000154" class="method-detail">
        <a name="M000154"></a>

        <div class="method-heading">
          <a href="#M000154" class="method-signature">
          <span class="method-name">dump_summary</span><span class="method-args">(duration, example_count, failure_count, pending_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000154-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 58</span>
58:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-identifier">example_count</span>, <span class="ruby-identifier">failure_count</span>, <span class="ruby-identifier">pending_count</span>)
59:           <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dry_run</span>
60:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
61:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Finished in #{duration} seconds&quot;</span>
62:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>
63: 
64:           <span class="ruby-identifier">summary</span> = <span class="ruby-node">&quot;#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}&quot;</span>
65:           <span class="ruby-identifier">summary</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;, #{pending_count} pending&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pending_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>  
66: 
67:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">failure_count</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
68:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pending_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
69:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">yellow</span>(<span class="ruby-identifier">summary</span>)
70:             <span class="ruby-keyword kw">else</span>
71:               <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">green</span>(<span class="ruby-identifier">summary</span>)
72:             <span class="ruby-keyword kw">end</span>
73:           <span class="ruby-keyword kw">else</span>
74:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">red</span>(<span class="ruby-identifier">summary</span>)
75:           <span class="ruby-keyword kw">end</span>
76:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
77:           <span class="ruby-identifier">dump_pending</span>
78:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000150" class="method-detail">
        <a name="M000150"></a>

        <div class="method-heading">
          <a href="#M000150" class="method-signature">
          <span class="method-name">example_pending</span><span class="method-args">(behaviour_name, example_name, message)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000150-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 31</span>
31:         <span class="ruby-keyword kw">def</span>  <span class="ruby-identifier">example_pending</span><span class="ruby-identifier">example_pending</span>(<span class="ruby-identifier">behaviour_name</span>, <span class="ruby-identifier">example_name</span>, <span class="ruby-identifier">message</span>)
32:           <span class="ruby-ivar">@pending_examples</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-node">&quot;#{behaviour_name} #{example_name}&quot;</span>, <span class="ruby-identifier">message</span>]
33:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000157" class="method-detail">
        <a name="M000157"></a>

        <div class="method-heading">
          <a href="#M000157" class="method-signature">
          <span class="method-name">format_backtrace</span><span class="method-args">(backtrace)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000157-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 97</span>
 97:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_backtrace</span>(<span class="ruby-identifier">backtrace</span>)
 98:           <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">nil?</span>
 99:           <span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">backtrace_line</span>(<span class="ruby-identifier">line</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
100:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000158" class="method-detail">
        <a name="M000158"></a>

        <div class="method-heading">
          <a href="#M000158" class="method-signature">
          <span class="method-name">backtrace_line</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000158-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 104</span>
104:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrace_line</span>(<span class="ruby-identifier">line</span>)
105:           <span class="ruby-identifier">line</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\A([^:]+:\d+)$/</span>, <span class="ruby-value str">'\\1:'</span>)
106:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000165" class="method-detail">
        <a name="M000165"></a>

        <div class="method-heading">
          <a href="#M000165" class="method-signature">
          <span class="method-name">blue</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000165-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 125</span>
125:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blue</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[34m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000159" class="method-detail">
        <a name="M000159"></a>

        <div class="method-heading">
          <a href="#M000159" class="method-signature">
          <span class="method-name">colour</span><span class="method-args">(text, colour_code)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000159-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 108</span>
108:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">colour_code</span>)
109:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@colour</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">output_to_tty?</span>
110:           <span class="ruby-node">&quot;#{colour_code}#{text}\e[0m&quot;</span>
111:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000161" class="method-detail">
        <a name="M000161"></a>

        <div class="method-heading">
          <a href="#M000161" class="method-signature">
          <span class="method-name">green</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000161-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 121</span>
121:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">green</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[32m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000163" class="method-detail">
        <a name="M000163"></a>

        <div class="method-heading">
          <a href="#M000163" class="method-signature">
          <span class="method-name">magenta</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000163-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 123</span>
123:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">magenta</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[35m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000160" class="method-detail">
        <a name="M000160"></a>

        <div class="method-heading">
          <a href="#M000160" class="method-signature">
          <span class="method-name">output_to_tty?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000160-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 113</span>
113:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_to_tty?</span>
114:           <span class="ruby-keyword kw">begin</span>
115:             <span class="ruby-ivar">@output</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Kernel</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">tty?</span>
116:           <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NoMethodError</span>
117:             <span class="ruby-keyword kw">false</span>
118:           <span class="ruby-keyword kw">end</span>
119:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000162" class="method-detail">
        <a name="M000162"></a>

        <div class="method-heading">
          <a href="#M000162" class="method-signature">
          <span class="method-name">red</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000162-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 122</span>
122:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">red</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[31m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000164" class="method-detail">
        <a name="M000164"></a>

        <div class="method-heading">
          <a href="#M000164" class="method-signature">
          <span class="method-name">yellow</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000164-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb, line 124</span>
124:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">yellow</span>(<span class="ruby-identifier">text</span>); <span class="ruby-identifier">colour</span>(<span class="ruby-identifier">text</span>, <span class="ruby-value str">&quot;\e[33m&quot;</span>); <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>